<!DOCTYPE html>
<html>
  <head>
    <script src="https://unpkg.com/konva@4.0.18/konva.min.js"></script>
    <meta charset="utf-8" />
    <title>Konva Canvas Scrolling Demo</title>
    <style>
    
    </style>
  </head>

  <body>
    <div id="container"></div>
    <script>
      var WIDTH = 3000;
      var HEIGHT = 3000;
      var NUMBER = 200;

      var stage = new Konva.Stage({
        container: 'container',
        width: WIDTH,
        height: HEIGHT
      });

      var layer = new Konva.Layer();
      stage.add(layer);

      function generateNode() {
        return new Konva.Circle({
          x: WIDTH * Math.random(),
          y: HEIGHT * Math.random(),
          radius: 50,
          fill: 'red',
          stroke: 'black'
        });
      }

      for (var i = 0; i < NUMBER; i++) {
        layer.add(generateNode());
      }
      layer.draw();
    </script>
  </body>
</html>